package com.kingyea.app.market.market.service;

import com.kingyea.app.market.condition.AllCondition;
import com.kingyea.app.market.market.bean.Market;
import com.kingyea.app.market.marketorg.bean.MarketOrg;
import com.kingyea.app.market.marketorg.bean.MarketOrgPo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @author
 * @version v1.0.0
 * @description Market 接口
 * @date Created in 2018-02-10 16:12:20
 */
public interface MarketService {

    /**
     * 通过ID查找对象
     *
     * @param marketCode
     * @return
     */
    Market getById(String marketCode) throws Exception;

    /**
     * 通用查询方法
     *
     * @param map
     * @return java.util.List<com.kingyea.app.market.market.bean.Market>
     * @author Mr.Lin
     * @date 2018/3/27 9:33
     */
    List<Market> queryList(Map<String, Object> map) throws Exception;

    /**
     * 列表
     *
     * @param market
     * @return
     */
    Object list(Map<String, Object> market) throws Exception;

    /**
     * 删除
     *
     * @param marketCode
     * @return
     */
    int deleteById(String marketCode) throws Exception;

    /**
     * 添加
     *
     * @param market
     * @return
     */
    Object save(Map<String, Object> market) throws Exception;

    /**
     * 更新
     *
     * @param market
     * @return
     */
    Object update(Map<String, Object> market) throws Exception;

    List<Market> getMarketByUser(@Param("loginAccount") String loginAccount) throws Exception;

    /**
     * 关联查询  找出供应商已有权限的市场和未有权限的市场
     */
    Object getListBySupplier(Map<String, Object> obj) throws Exception;

    List<MarketOrg> getMarketOrgList(AllCondition condition);

    Boolean batchSaveOrg(MarketOrgPo po);
}
